<template>
  <div>
    <img :src="v.image" width="100%" height="300" alt="">
    <div class="info">
      <div class="lef">
        <h3>{{ v.title }}</h3>
        <div class="desc">{{ v.desc }}</div>
      </div>
      <div class="right">
        <div class="score">{{ v.score }}评分</div>
        <van-rate v-model="v.score" readonly allow-half></van-rate>
      </div>
    </div>
  </div>
</template>


<script setup>
import { useRoute } from 'vue-router'
import axios from 'axios'
import { ref } from 'vue';
const route = useRoute();
const { id } = route.params;
const v = ref({})
const _getDetail = async () => {
  const resp = await axios.get('/api/list/' + id);
  console.log(resp.data.data)
  v.value = resp.data.data
}

_getDetail()
</script>

<style lang="scss">
.info {
  display: flex;
  justify-content: space-between;
  .right {
    text-align: center;
  }
}
</style>